#pragma once

#include <QWidget>
#include <qinputdialog.h>
#include "MyData.h"
#include "SportMeeting.h"
#include "ui_page2.h"
const int preNum = 1e2 + 5;
class SportMeeting;
class page2 : public QWidget
{
	Q_OBJECT

public:
	page2(QWidget *parent = nullptr);
	page2(MyData* myData, QWidget* parant = nullptr);
	~page2();
	void setData(MyData* data);
	void loadData();
	void setHasReadFile(bool hasRead);
	friend void setPage(SportMeeting* sportMeeting, QWidget*);
	friend int messageQuestion(QString title, QString text, QMessageBox::StandardButton, QMessageBox::StandardButton, QWidget* parent);
	friend void message(QString title, QString text, QMessageBox::Icon, QMessageBox::Button, QWidget* parent);

	std::vector<std::vector<int>>	predispose;
private:
	Ui::page2Class ui;
	SportMeeting* parent;
	MyData* myData; 
	bool hasReadFile;
private slots:
	void next_page();
	void pre_page();
	void configure();
	void chbox();
	void saveAsPreset();
	void changePreset();
	void deletePreset();
};
